﻿using YNTK.Common.Helper;
using YNTK.Common.Model;
using YNTK.SubDev.Entitys.Dto.ZyOaCapital;
using Mapster;
using System.Collections.Generic;

namespace YNTK.SubDev.Entitys.Mapper.ZyOaCapital
{
	public class Mapper : IRegister
	{
		public void Register(TypeAdapterConfig config)
		{
			config.ForType<ZyOaCapitalCrInput, ZyOaCapitalEntity>()
				.Map(dest => dest.Photo, src => src.photo.ToJson())
				;
			config.ForType<ZyOaCapitalEntity, ZyOaCapitalInfoOutput>()
				.Map(dest => dest.photo, src => src.Photo.ToObject<List<FileControlsModel>>())
				;
		}
	}
}